package one.stand.task;

import com.jmp.feign.ChatFeign;
import com.jmp.feign.UserFeign;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class UserPhotoTask {
    @Autowired
    private ChatFeign chatFeign;
    @Autowired
    private UserFeign userFeign;

    @Scheduled(cron = "0 */1 * * * ?")
    public void chatInit() {
        log.info("chatInit");
        chatFeign.init();
    }

    @Scheduled(cron = "0 59 23 * * ?")
    public void updateUserImgToLocal() {
        log.info("updateUserImgToLocal");
        userFeign.updateImgLocal();
    }
}
